// 导入请求实例
import request from '@/utils/request'

// 查员工简单列表
export const getEmployeeSimpleData = () => {
  return request({
    url: '/sys/user/simple',
    method: 'GET'
  })
}
// 获取员工列表
export const getUserListData = params => {
  return request({
    url: '/sys/user',
    method: 'GET',
    params
  })
}

// 获取员工基本信息
export const getUserInfoData = id => {
  return request({
    url: '/sys/user/' + id,
    method: 'GET'
  })
}

// 新增员工
export const addUserData = data => {
  return request({
    url: '/sys/user',
    method: 'POST',
    data
  })
}

// 删除员工
export const delUserData = id => {
  return request({
    url: '/sys/user/' + id,
    method: 'DELETE'
  })
}

// 保存员工基本信息
export const editUserData = data => {
  return request({
    url: '/sys/user/' + data.id,
    method: 'PUT',
    data
  })
}
